<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:40:"../template/wap/default/index/index.html";i:1582628076;s:62:"/www/wwwroot/schoolnx.nxers.com/template/wap/default/base.html";i:1583650542;}*/ ?>
<!DOCTYPE html><html lang="zh-cn"><head>    <meta charset="utf-8">    <?php if($title): ?>    <title><?php echo $title; ?></title>    <?php else: ?>    <title><?php echo config('website.site_title'); ?></title>    <?php endif; ?>    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />    <meta name="keywords" content="<?php echo config('website.site_keywords'); ?>">    <meta name="description" content="<?php echo config('website.site_description'); ?>">    <link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">    <link rel="stylesheet" type="text/css" href="/static/libs/layui/css/layui.css">    <link type="text/css" rel="stylesheet" href="/static/libs/hui/css/hui.css" />    <link type="text/css" rel="stylesheet" href="/static/libs/hui/css/mobile.css" />    </head><body>
<header class="hui-header">
    <a href="<?php echo url('index/user/index'); ?>">
        <?php if($islogin): ?>
        <img src="<?php echo defaultAvatar($userInfo['avatar']); ?>" class="layui-nav-img" style="margin:8px 5px 10px 5px;">
        <?php else: ?>
        <div id="hui-header-user"></div>
        <?php endif; ?>
    </a>
    <div id="hui-header-sreach">
        <div id="hui-header-sreach-icon"></div>
        <form  action="<?php echo url('index/course/search'); ?>" id="search"><input type="search" name="keywords" id="searchKey" onkeydown="if(event.keyCode==13)return false;" placeholder="请输入课程关键字" /></form>
    </div>
    <div id="hui-header-menu"  onclick="hui.showSlideMenu();"></div>
</header>
<div class="hui-wrap">
    <div class="hui-swipe" id="swipe">
        <div class="hui-swipe-items" >
            <?php if(is_array($slide) || $slide instanceof \think\Collection || $slide instanceof \think\Paginator): if( count($slide)==0 ) : echo "" ;else: foreach($slide as $key=>$vo): ?>
            <div class="hui-swipe-item"><a href="<?php echo $vo['url']; ?>" target="<?php echo $vo['target']; ?>"><img style="height:150px;" src="<?php echo $vo['image']; ?>"/></a></div>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </div>
    </div>
    <div class="hui-common-title mt10">
        <div class="hui-common-title-line"></div>
        <div class="hui-common-title-txt">精品课程</div>
        <div class="hui-common-title-line"></div>
    </div>
    <div class="hui-flex pd10 index-course-list" style="flex-wrap:wrap;">
        <?php if(is_array($allCourse) || $allCourse instanceof \think\Collection || $allCourse instanceof \think\Paginator): if( count($allCourse)==0 ) : echo "" ;else: foreach($allCourse as $key=>$vo): ?>
        <div  class="item">
            <a href="<?php echo url('index/course/info',array('id'=>hashids_encode($vo['id']),'type'=>hashids_encode($vo['type']))); ?>">
                <div class="image"><img src="<?php echo $vo['picture']; ?>"></div>
                <div class="hui-center-title title mt10 layui-elip"><?php echo $vo['title']; ?></div>
                <div class="tll ml10">
                    <i class="layui-icon layui-icon-user metas"></i>
                    <span class="metas"><?php echo getUserNum($vo['id'],$vo['type']); ?></span>
                    <span class="hui-icons hui-icons-play metas ml10"></span>
                    <span class="metas"><?php echo getCourseNum($vo['id'],$vo['type']); ?></span>
                    <?php if($vo['price']==0): ?>
                    <span class="free">免费</span>
                    <?php else: ?>
                    <span class="price"><i class="layui-icon layui-icon-rmb mr5" style="font-size: 14px"></i><?php echo $vo['price']; ?></span>
                    <?php endif; ?>
                </div>
            </a>>
        </div>
        <?php endforeach; endif; else: echo "" ;endif; ?>
    </div>
</div>
<div class="hui-wrap mb70">
    <div class="hui-common-title mt10">
        <div class="hui-common-title-line"></div>
        <div class="hui-common-title-txt">推荐班级</div>
        <div class="hui-common-title-line"></div>
    </div>
    <div class="hui-flex pd10 index-course-list" style="flex-wrap:wrap;">
        <?php if(is_array($classroom) || $classroom instanceof \think\Collection || $classroom instanceof \think\Paginator): if( count($classroom)==0 ) : echo "" ;else: foreach($classroom as $key=>$vo): ?>
        <div class="item">
            <a href="<?php echo url('index/classroom/info',array('id'=>hashids_encode($vo['id']))); ?>">
                <div class="image"><img src="<?php echo $vo['picture']; ?>"></div>
                <div class="hui-center-title title mt5 layui-elip"><?php echo $vo['title']; ?></div>
                <div class="tll ml10">
                    <span class="hui-icons hui-icons-my metas"></span>
                    <span class="metas"><?php echo getUserNum($vo['id'],$vo['type']); ?></span>
                    <span class="hui-icons hui-icons-play metas ml10"></span>
                    <span class="metas"><?php echo getClassroomCourseNum($vo['id']); ?></span>
                    <?php if($vo['price']==0): ?>
                    <span class="free">免费</span>
                    <?php else: ?>
                    <span class="price"><i class="layui-icon layui-icon-rmb mr5" style="font-size: 14px"></i><?php echo $vo['price']; ?></span>
                    <?php endif; ?>
                </div>
             </a>
        </div>
        <?php endforeach; endif; else: echo "" ;endif; ?>
    </div>
</div>

<div id="hui-footer">
    <a href="/" id="nav-home">
        <div class="iconfont icon-shouye"></div>
        <div class="hui-footer-text">首页</div>
    </a>
    <a href="<?php echo url('index/course/videoindex'); ?>" id="nav-video">
        <div class="iconfont icon-video"></div>
        <div class="hui-footer-text">录播</div>
    </a>
    <a href="<?php echo url('index/course/liveindex'); ?>" id="nav-live">
        <div class="iconfont icon-zhiboguanli"></div>
        <div class="hui-footer-text">直播</div>
    </a>
    <a href="<?php echo url('index/classroom/index'); ?>" id="nav-classroom">
        <div class="hui-footer-icons hui-icons-write"></div>
        <div class="hui-footer-text">班级</div>
    </a>
    <a href="<?php echo url('index/user/index'); ?>" id="nav-my">
        <div class="iconfont icon-wode"></div>
        <div class="hui-footer-text">我的</div>
    </a>
</div>
<div class="hui-slide-menu" style="width:210px;">    <div class="hui-list">        <ul>            <li>                <a href="/">                    <div class="hui-list-text">                        <div class="hui-list-text-content" style="color:#fff;">首页</div>                        <div class="hui-list-info"><span class="hui-icons hui-icons-right"  style="color:#fff;"></span></div>                    </div>                </a>            </li>            <li>                <a href="<?php echo url('index/course/videoindex'); ?>">                    <div class="hui-list-text">                        <div class="hui-list-text-content" style="color:#fff;">录播课程</div>                        <div class="hui-list-info"><span class="hui-icons hui-icons-right"  style="color:#fff;"></span></div>                    </div>                </a>            </li>            <li>                <a href="<?php echo url('index/course/liveindex'); ?>">                    <div class="hui-list-text">                        <div class="hui-list-text-content"  style="color:#fff;">直播课程</div>                        <div class="hui-list-info "><span class="hui-icons hui-icons-right"  style="color:#fff;"></span></div>                    </div>                </a>            </li>            <li>                <a href="<?php echo url('index/classroom/index'); ?>">                    <div class="hui-list-text">                        <div class="hui-list-text-content"  style="color:#fff;">班级课程</div>                        <div class="hui-list-info"><span class="hui-icons hui-icons-right"  style="color:#fff;"></span></div>                    </div>                </a>            </li>            <li>                <a href="<?php echo url('index/article/index'); ?>">                    <div class="hui-list-text">                        <div class="hui-list-text-content"  style="color:#fff;">行业资讯</div>                        <div class="hui-list-info"><span class="hui-icons hui-icons-right"  style="color:#fff;"></span></div>                    </div>                </a>            </li>            <li>                <a href="<?php echo url('index/teacher/index'); ?>">                    <div class="hui-list-text">                        <div class="hui-list-text-content"  style="color:#fff;">名师风采</div>                        <div class="hui-list-info"><span class="hui-icons hui-icons-right"  style="color:#fff;"></span></div>                    </div>                </a>            </li>        </ul>    </div></div><script src="/static/libs/layui/layui.all.js"></script><script src="/static/libs/common/jquery.min.js"></script><script src="/static/libs/common/common.js"></script><script src="/static/libs/hui/js/hui.js"></script><script src="https://cdn.bootcss.com/stickyNavbar.js/1.3.5/jquery.stickyNavbar.min.js"></script>
<script src="/static/libs/hui/js/hui-swipe.js" type="text/javascript" charset="utf-8"></script>
<script>
    var swipe = new huiSwpie('#swipe');
    swipe.autoPlay = true;
    swipe.run();
    hui.slideMenu();
</script>
<script type="text/javascript">
    //监听搜索事件
    document.getElementById('searchKey').addEventListener('keyup', function(e){if(e.keyCode == 13){searchNow();}});
    function hotSearch(k){
        hui('#searchKey').val(k);
        searchNow();
    }
    //核心搜索函数
    function searchNow(){
        document.activeElement.blur();
        var kwd = hui('#searchKey').val();
        kwd = kwd.trim();
        if(kwd.length < 2){
            hui.toast('关键字至少2个字符');
            hui('.hui-hot-sreach').show();
            return;
        }
        //关闭热搜
        hui('.hui-hot-sreach').hide();
        $("#search").submit();
    }
    //清空
    function clearSearch(){
        hui('#searchKey').val('');
        hui('.hui-hot-sreach').show();
    }
</script>
</body></html>